Skip to content

Add validation for trailing single colon in IPv6 address parsing#1232

Merged
trcrsired merged 1 commit intocppfastio:nextfrom
MacroModel:next
Dec 3, 2025
Merged

Add validation for trailing single colon in IPv6 address parsing#1232
trcrsired merged 1 commit intocppfastio:nextfrom
MacroModel:next

Conversation

@MacroModel
Copy link
Copy Markdown
Collaborator

  • Added check in scn_cnt_define_in6addr_shorten_impl to return parse_code::invalid when buffer ends with single colon
  • Prevents accepting malformed IPv6 addresses ending with ":" instead of "::" or valid hex digit
  • Split compound condition to validate buffer bounds before checking for double colon

- Added check in `scn_cnt_define_in6addr_shorten_impl` to return `parse_code::invalid` when buffer ends with single colon
- Prevents accepting malformed IPv6 addresses ending with ":" instead of "::" or valid hex digit
- Split compound condition to validate buffer bounds before checking for double colon
@trcrsired trcrsired merged commit a90b08f into cppfastio:next Dec 3, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants